﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="manager_user" ValidateRequest="false" %>

<%@ Register assembly="BasicFrame.WebControls.BasicDatePicker" namespace="BasicFrame.WebControls" tagprefix="BDP" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test Results</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
    <link rel="stylesheet" type="text/css" href="../css/manager.css"/>
    <style type="text/css">
    .txt {
    	font-size:18px;
        padding:5px 0 5px 0;	
    } 
    </style>
</head>
<body>
    <form runat="server" style="padding:10px">
        <div id="layout_infor" runat="server">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td width="430" valign="top">
                        <div class="txt">Email Candidate</div>
                        <asp:TextBox ID="txt_email" class="input_text_view" Enabled="false" runat="server"></asp:TextBox>
                        <div class="txt">Code Login</div>
                        <asp:TextBox ID="txt_code_login" MaxLength="10" class="input_text_view" style="text-transform:uppercase" runat="server"></asp:TextBox>
                        <div class="txt">Password</div>
                        <asp:TextBox ID="txt_pass" MaxLength="6" class="input_text_view" runat="server"></asp:TextBox>
                        <div class="txt">Round</div>
                        <asp:TextBox ID="txt_round" class="input_text_view" Enabled="false" runat="server"></asp:TextBox>
                        <div class="txt">Exam</div>
                        <div class="input_text_view">
                            <asp:DropDownList ID="ddl_exam" runat="server" style="border:0;font-size:18px;width:387px;margin-top:2px;padding:10px 0 8px 0">
                                <asp:ListItem>-- Select once --</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div>
                            <div style="width:100%;display:block;height:65px">
                                <div style="float:left;width:200px">
                                    <div class="txt">Date Test</div>
                                    <div>
                                        <BDP:BasicDatePicker ID="bdp_datestart" runat="server" DateFormat="yyyy-MM-dd" ReadOnly="True"></BDP:BasicDatePicker>
                                    </div>
                                </div>
                                <div style="float:left">
                                    <div class="txt">Time start</div>
                                    <div>
                                        <asp:DropDownList ID="ddl_timestart" Width="100" runat="server">
                                            <asp:ListItem>9:00</asp:ListItem>
                                            <asp:ListItem>10:00</asp:ListItem>
                                            <asp:ListItem>11:00</asp:ListItem>
                                            <asp:ListItem>13:00</asp:ListItem>
                                            <asp:ListItem>12:00</asp:ListItem>
                                            <asp:ListItem>14:00</asp:ListItem>
                                            <asp:ListItem>15:00</asp:ListItem>
                                            <asp:ListItem>16:00</asp:ListItem>
                                            <asp:ListItem>17:00</asp:ListItem>
                                            <asp:ListItem>18:00</asp:ListItem>
                                            <asp:ListItem>19:00</asp:ListItem>
                                            <asp:ListItem>20:00</asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div style="padding:0 0 10px 0">
                            <asp:Button ID="btn_save" ValidationGroup="vl" class="btnWhite" runat="server" Text="Save" onclick="btn_save_Click" />
                            <asp:Button ID="btn_reset" class="btnWhite" runat="server" Text="Reset" onclick="btn_reset_Click" />
                            <asp:Button ID="btn_edit" class="btnWhite" runat="server" Text="Edit" Visible="false" onclick="btn_edit_Click" />
                            <asp:Button ID="btn_back" class="btnWhite" runat="server" Text="Back" onclick="btn_back_Click" />
                        </div>
                        <div style="font-size: 15px; color: #F00; padding-top: 10px;text-align:center">
                            <b><asp:Label ID="lbl_msg" runat="server" Text=""></asp:Label></b>
                        </div>
                    </td>
                    <td valign="top">
                        <div id="layout_search_candidate" runat="server">
                            <div class="txt" style="color:#F00"><asp:Label ID="lbl_candidate" runat="server" Text=""></asp:Label>&nbsp;</div>
                            <div>
                                <asp:TextBox ID="txt_search_candadite" class="input_text_view" runat="server"></asp:TextBox>
                                <asp:Button ID="btn_search_candadite" class="btnWhite" runat="server" Text="Search" onclick="btn_search_candadite_Click" /> 
                            </div>
                            <div class="txt">List Candidate</div>
                            
                            
                            <asp:GridView ID="mGridView_Candidate" Width="100%" runat="server" BorderColor="#CC9966" BorderWidth="1px"
                                AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                                GridLines="None" onpageindexchanging="mGridView_Candidate_PageIndexChanging" 
                                        onselectedindexchanged="mGridView_Candidate_SelectedIndexChanged">
                                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                <Columns>
                                    <asp:BoundField DataField="name" HeaderText="Name">
                                        <ItemStyle Width="150px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="email" HeaderText="Email">
                                        <ItemStyle Width="170px" />
                                    </asp:BoundField>                                
                                    <asp:CommandField HeaderText="Select" ShowSelectButton="True">
                                        <ItemStyle HorizontalAlign="Center" Width="30px" />
                                    </asp:CommandField>
                                </Columns>
                                <FooterStyle BackColor="#990000" ForeColor="White" Font-Bold="True" />
                                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="White" />
                            </asp:GridView>
                        </div>                        
                    </td>
                </tr>
            </table>
            
        </div>
        
        <div id="layout_details" runat="server" visible="false">
            <fieldset>
                <legend style="color:#F00;font-size:18px"><b>Detailed information candidates</b></legend>
                <table width="100%" border="0" cellpadding="0" cellspacing="10" style="font-size:18px">
                    <tr>
                        <td width="120" align="right" style="color:#00F">Email</td>
                        <td width="30" align="center">:</td>
                        <td width="220"><asp:Label ID="lbl_email" runat="server"></asp:Label></td>
                        <td width="150" align="right" style="color:#00F">Exam Test</td>
                        <td width="30" align="center">:</td>
                        <td><asp:Label ID="lbl_examtest" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td align="right" style="color:#00F">Code Login</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_codelgoin" runat="server"></asp:Label></td>
                        <td align="right" style="color:#00F">Round</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_round" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td align="right" style="color:#00F">Password</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_pass" runat="server"></asp:Label></td>
                        <td align="right" style="color:#00F">Answer</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_answer" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td align="right" style="color:#00F">Date Test</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_datetest" runat="server"></asp:Label></td>
                        <td align="right" style="color:#00F">Time Completed</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_timecompleted" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td align="right" style="color:#00F">Time Start</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_timestart" runat="server"></asp:Label></td>
                        <td align="right" style="color:#00F">Results</td>
                        <td align="center">:</td>
                        <td><asp:Label ID="lbl_results" runat="server"></asp:Label></td>
                    </tr>                    
                </table>
                <asp:GridView ID="mGridView_question" runat="server" CellPadding="4" Width="100%" AutoGenerateColumns="False"
                    ForeColor="#333333" GridLines="None">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:BoundField DataField="Number" HeaderText="Number">
                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Content">
                            <ItemTemplate>
                                <%#Eval("Content") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Answer" HeaderText="Answer">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="YourAnswer">
                            <ItemTemplate>
                                <%#Eval("YourAnswer")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </fieldset>
            <div style="padding-top:10px">
                <asp:Button ID="btn_details_back" class="btnWhite" runat="server" Text="Back" onclick="btn_details_back_Click" />
            </div>
        </div>
        
        <div id="layout_gridview" runat="server">
            <div style="height:50px">
                <div style="float:left">
                    <asp:Button ID="btn_add" class="btnGreen" runat="server" Text="Add" onclick="btn_add_Click" /> 
                    <asp:Button ID="btn_del" class="btnRed" runat="server" Text="Delete" onclick="btn_del_Click" />
                    <asp:Button ID="btn_refresh" class="btnWhite" runat="server" Text="Refresh" onclick="btn_refresh_Click" />
                </div>
                <div style="float:right">
                    <asp:TextBox ID="txt_search_test" class="input_text_view" runat="server"></asp:TextBox>
                    <asp:Button ID="btn_search_test" class="btnWhite" runat="server" Text="Search" onclick="btn_search_test_Click" /> 
                </div>                 
            </div>
            <div style="font-size: 15px; color: #F00; padding-top: 10px; text-align: center">
                <b><asp:Label ID="lbl_not_data" runat="server" Text=""></asp:Label></b>
            </div>
            <asp:GridView ID="mGridView_Test" Style="border: 1px solid #a9a9a9" 
                runat="server" Width="100%"
                AutoGenerateColumns="False" BackColor="White" BorderColor="Black" BorderStyle="None"
                BorderWidth="1px" CellPadding="5" AllowPaging="True" AllowSorting="True" 
                PageSize="15" onpageindexchanging="mGridView_Test_PageIndexChanging" 
                onselectedindexchanged="mGridView_Test_SelectedIndexChanged" 
                onrowcommand="mGridView_Test_RowCommand">
                <FooterStyle BackColor="White" ForeColor="#000066" />
                <Columns>
                    <asp:TemplateField HeaderText="Select">
                        <ItemTemplate>
                            <input type="checkbox" id="chk" runat="server" value='<%#Eval("email") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="email" HeaderText="Email Candidate">
                    </asp:BoundField>
                    <asp:BoundField DataField="codelogin" HeaderText="Code Login">
                        <ItemStyle Width="150px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="pass" HeaderText="Password" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="examtest" HeaderText="Exam Test">
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="round" HeaderText="Round" >                                
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="datetest" HeaderText="Date Test" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="timestart" HeaderText="Time Start" >
                        <ItemStyle HorizontalAlign="Right" Width="40px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="status" HeaderText="Status" >
                        <ItemStyle HorizontalAlign="Right" Width="60px" />
                        <ItemStyle HorizontalAlign="Center" Width="60px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="View">
                      <ItemTemplate>
                        <asp:LinkButton runat="server" CommandName="ViewCandidate" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>">View</asp:LinkButton>
                      </ItemTemplate> 
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:TemplateField>
                    <asp:CommandField HeaderText="Edit" ShowSelectButton="True" SelectText="Edit">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:CommandField>
                </Columns>
                <RowStyle ForeColor="#000066" />
                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                <HeaderStyle BackColor="#05ADEE" Font-Bold="True" ForeColor="White" />
            </asp:GridView>
            
        </div>
    </form>
</body>
</html>
